<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class activity extends Model
{
    public $table = 'activity';
    public $timestamps = false;
    protected $fillable = [];
    public $primaryKey = "id";

    protected function lists($page)
    {
        $pageSize = 8;
        $offset = ($page-1)*$pageSize;
        $res = $this->where('is_del', 0)
            ->take($pageSize)->skip($offset)
            ->get()->toArray();
        return $res;
    }
}
